/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.KeyNamePair;

/** Generated Model for MM_WaybillLine
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_MM_WaybillLine extends PO implements I_MM_WaybillLine, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20130724L;

    /** the default Constructor */
    public X_MM_WaybillLine(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_MM_WaybillLine (Properties ctx, int MM_WaybillLine_ID, String trxName)
    {
      super (ctx, MM_WaybillLine_ID, trxName);
      /** if (MM_WaybillLine_ID == 0)
        {
			setMM_Waybill_ID (0);
// @MM_Waybill_ID@
			setMM_WaybillLine_ID (0);
        } */
    }

    /** Load Constructor */
    public X_MM_WaybillLine (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_MM_WaybillLine[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	/** Set Coupons issued.
		@param MM_Coupons_Issued Coupons issued	  */
	public void setMM_Coupons_Issued (String MM_Coupons_Issued)
	{
		set_Value (COLUMNNAME_MM_Coupons_Issued, MM_Coupons_Issued);
	}

	/** Get Coupons issued.
		@return Coupons issued	  */
	public String getMM_Coupons_Issued () 
	{
		return (String)get_Value(COLUMNNAME_MM_Coupons_Issued);
	}

	public org.compiere.model.I_C_BPartner getMM_Customer() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getMM_Customer_ID(), get_TrxName());	}

	/** Set Customer.
		@param MM_Customer_ID Customer	  */
	public void setMM_Customer_ID (int MM_Customer_ID)
	{
		if (MM_Customer_ID < 1) 
			set_Value (COLUMNNAME_MM_Customer_ID, null);
		else 
			set_Value (COLUMNNAME_MM_Customer_ID, Integer.valueOf(MM_Customer_ID));
	}

	/** Get Customer.
		@return Customer	  */
	public int getMM_Customer_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Customer_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Downtime begin.
		@param MM_Downtime_Begin Downtime begin	  */
	public void setMM_Downtime_Begin (Timestamp MM_Downtime_Begin)
	{
		set_Value (COLUMNNAME_MM_Downtime_Begin, MM_Downtime_Begin);
	}

	/** Get Downtime begin.
		@return Downtime begin	  */
	public Timestamp getMM_Downtime_Begin () 
	{
		return (Timestamp)get_Value(COLUMNNAME_MM_Downtime_Begin);
	}

	/** Set Downtime end.
		@param MM_Downtime_End Downtime end	  */
	public void setMM_Downtime_End (Timestamp MM_Downtime_End)
	{
		set_Value (COLUMNNAME_MM_Downtime_End, MM_Downtime_End);
	}

	/** Get Downtime end.
		@return Downtime end	  */
	public Timestamp getMM_Downtime_End () 
	{
		return (Timestamp)get_Value(COLUMNNAME_MM_Downtime_End);
	}

	/** Set Downtime reason.
		@param MM_Downtime_Reason Downtime reason	  */
	public void setMM_Downtime_Reason (String MM_Downtime_Reason)
	{
		set_Value (COLUMNNAME_MM_Downtime_Reason, MM_Downtime_Reason);
	}

	/** Get Downtime reason.
		@return Downtime reason	  */
	public String getMM_Downtime_Reason () 
	{
		return (String)get_Value(COLUMNNAME_MM_Downtime_Reason);
	}

	/** Set Including evening.
		@param MM_Including_Evening Including evening	  */
	public void setMM_Including_Evening (int MM_Including_Evening)
	{
		set_Value (COLUMNNAME_MM_Including_Evening, Integer.valueOf(MM_Including_Evening));
	}

	/** Get Including evening.
		@return Including evening	  */
	public int getMM_Including_Evening () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Including_Evening);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Including holiday.
		@param MM_Including_Holiday Including holiday	  */
	public void setMM_Including_Holiday (int MM_Including_Holiday)
	{
		set_Value (COLUMNNAME_MM_Including_Holiday, Integer.valueOf(MM_Including_Holiday));
	}

	/** Get Including holiday.
		@return Including holiday	  */
	public int getMM_Including_Holiday () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Including_Holiday);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Including night.
		@param MM_Including_Night Including night	  */
	public void setMM_Including_Night (int MM_Including_Night)
	{
		set_Value (COLUMNNAME_MM_Including_Night, Integer.valueOf(MM_Including_Night));
	}

	/** Get Including night.
		@return Including night	  */
	public int getMM_Including_Night () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Including_Night);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Including on schedule (pay).
		@param MM_IncludingOnSched_Pay Including on schedule (pay)	  */
	public void setMM_IncludingOnSched_Pay (int MM_IncludingOnSched_Pay)
	{
		set_Value (COLUMNNAME_MM_IncludingOnSched_Pay, Integer.valueOf(MM_IncludingOnSched_Pay));
	}

	/** Get Including on schedule (pay).
		@return Including on schedule (pay)	  */
	public int getMM_IncludingOnSched_Pay () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_IncludingOnSched_Pay);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Including request.
		@param MM_Including_Request Including request	  */
	public void setMM_Including_Request (int MM_Including_Request)
	{
		set_Value (COLUMNNAME_MM_Including_Request, Integer.valueOf(MM_Including_Request));
	}

	/** Get Including request.
		@return Including request	  */
	public int getMM_Including_Request () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Including_Request);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Including with passenger.
		@param MM_Including_WithPassenger Including with passenger	  */
	public void setMM_Including_WithPassenger (int MM_Including_WithPassenger)
	{
		set_Value (COLUMNNAME_MM_Including_WithPassenger, Integer.valueOf(MM_Including_WithPassenger));
	}

	/** Get Including with passenger.
		@return Including with passenger	  */
	public int getMM_Including_WithPassenger () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Including_WithPassenger);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Operation time driver.
		@param MM_OperationTime_Driver Operation time driver	  */
	public void setMM_OperationTime_Driver (int MM_OperationTime_Driver)
	{
		set_Value (COLUMNNAME_MM_OperationTime_Driver, Integer.valueOf(MM_OperationTime_Driver));
	}

	/** Get Operation time driver.
		@return Operation time driver	  */
	public int getMM_OperationTime_Driver () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_OperationTime_Driver);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Operation time engine.
		@param MM_OperationTime_Engine Operation time engine	  */
	public void setMM_OperationTime_Engine (int MM_OperationTime_Engine)
	{
		set_Value (COLUMNNAME_MM_OperationTime_Engine, Integer.valueOf(MM_OperationTime_Engine));
	}

	/** Get Operation time engine.
		@return Operation time engine	  */
	public int getMM_OperationTime_Engine () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_OperationTime_Engine);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Performed passage total.
		@param MM_PerformedPassage_Total Performed passage total	  */
	public void setMM_PerformedPassage_Total (int MM_PerformedPassage_Total)
	{
		set_Value (COLUMNNAME_MM_PerformedPassage_Total, Integer.valueOf(MM_PerformedPassage_Total));
	}

	/** Get Performed passage total.
		@return Performed passage total	  */
	public int getMM_PerformedPassage_Total () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_PerformedPassage_Total);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Mileage.
		@param MM_Result_Mileage_Total Mileage	  */
	public void setMM_Result_Mileage_Total (int MM_Result_Mileage_Total)
	{
		set_Value (COLUMNNAME_MM_Result_Mileage_Total, Integer.valueOf(MM_Result_Mileage_Total));
	}

	/** Get Mileage.
		@return Mileage	  */
	public int getMM_Result_Mileage_Total () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Result_Mileage_Total);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Result mileage zero.
		@param MM_Result_Mileage_Zero Result mileage zero	  */
	public void setMM_Result_Mileage_Zero (int MM_Result_Mileage_Zero)
	{
		set_Value (COLUMNNAME_MM_Result_Mileage_Zero, Integer.valueOf(MM_Result_Mileage_Zero));
	}

	/** Get Result mileage zero.
		@return Result mileage zero	  */
	public int getMM_Result_Mileage_Zero () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Result_Mileage_Zero);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Result speedometer arrival.
		@param MM_Result_SpeedometerArrival Result speedometer arrival	  */
	public void setMM_Result_SpeedometerArrival (int MM_Result_SpeedometerArrival)
	{
		set_Value (COLUMNNAME_MM_Result_SpeedometerArrival, Integer.valueOf(MM_Result_SpeedometerArrival));
	}

	/** Get Result speedometer arrival.
		@return Result speedometer arrival	  */
	public int getMM_Result_SpeedometerArrival () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Result_SpeedometerArrival);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Result speedometer departure.
		@param MM_Result_SpeedometerDeparture Result speedometer departure	  */
	public void setMM_Result_SpeedometerDeparture (int MM_Result_SpeedometerDeparture)
	{
		set_Value (COLUMNNAME_MM_Result_SpeedometerDeparture, Integer.valueOf(MM_Result_SpeedometerDeparture));
	}

	/** Get Result speedometer departure.
		@return Result speedometer departure	  */
	public int getMM_Result_SpeedometerDeparture () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Result_SpeedometerDeparture);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Result time of arrival.
		@param MM_Result_TimeOf_Arrival Result time of arrival	  */
	public void setMM_Result_TimeOf_Arrival (Timestamp MM_Result_TimeOf_Arrival)
	{
		set_Value (COLUMNNAME_MM_Result_TimeOf_Arrival, MM_Result_TimeOf_Arrival);
	}

	/** Get Result time of arrival.
		@return Result time of arrival	  */
	public Timestamp getMM_Result_TimeOf_Arrival () 
	{
		return (Timestamp)get_Value(COLUMNNAME_MM_Result_TimeOf_Arrival);
	}

	/** Set Result time of departure.
		@param MM_Result_TimeOf_Departure Result time of departure	  */
	public void setMM_Result_TimeOf_Departure (Timestamp MM_Result_TimeOf_Departure)
	{
		set_Value (COLUMNNAME_MM_Result_TimeOf_Departure, MM_Result_TimeOf_Departure);
	}

	/** Get Result time of departure.
		@return Result time of departure	  */
	public Timestamp getMM_Result_TimeOf_Departure () 
	{
		return (Timestamp)get_Value(COLUMNNAME_MM_Result_TimeOf_Departure);
	}

	/** Set Route move departure.
		@param MM_RouteMove_Departure Route move departure	  */
	public void setMM_RouteMove_Departure (String MM_RouteMove_Departure)
	{
		set_Value (COLUMNNAME_MM_RouteMove_Departure, MM_RouteMove_Departure);
	}

	/** Get Route move departure.
		@return Route move departure	  */
	public String getMM_RouteMove_Departure () 
	{
		return (String)get_Value(COLUMNNAME_MM_RouteMove_Departure);
	}

	/** Set Route move destination.
		@param MM_RouteMove_Destination Route move destination	  */
	public void setMM_RouteMove_Destination (String MM_RouteMove_Destination)
	{
		set_Value (COLUMNNAME_MM_RouteMove_Destination, MM_RouteMove_Destination);
	}

	/** Get Route move destination.
		@return Route move destination	  */
	public String getMM_RouteMove_Destination () 
	{
		return (String)get_Value(COLUMNNAME_MM_RouteMove_Destination);
	}

	/** Set Mileage.
		@param MM_Task_Mileage Mileage	  */
	public void setMM_Task_Mileage (int MM_Task_Mileage)
	{
		set_Value (COLUMNNAME_MM_Task_Mileage, Integer.valueOf(MM_Task_Mileage));
	}

	/** Get Mileage.
		@return Mileage	  */
	public int getMM_Task_Mileage () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Task_Mileage);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Time of arrival.
		@param MM_Task_TimeOf_Arrival Time of arrival	  */
	public void setMM_Task_TimeOf_Arrival (Timestamp MM_Task_TimeOf_Arrival)
	{
		set_Value (COLUMNNAME_MM_Task_TimeOf_Arrival, MM_Task_TimeOf_Arrival);
	}

	/** Get Time of arrival.
		@return Time of arrival	  */
	public Timestamp getMM_Task_TimeOf_Arrival () 
	{
		return (Timestamp)get_Value(COLUMNNAME_MM_Task_TimeOf_Arrival);
	}

	/** Set Time of departure.
		@param MM_Task_TimeOf_Departure Time of departure	  */
	public void setMM_Task_TimeOf_Departure (Timestamp MM_Task_TimeOf_Departure)
	{
		set_Value (COLUMNNAME_MM_Task_TimeOf_Departure, MM_Task_TimeOf_Departure);
	}

	/** Get Time of departure.
		@return Time of departure	  */
	public Timestamp getMM_Task_TimeOf_Departure () 
	{
		return (Timestamp)get_Value(COLUMNNAME_MM_Task_TimeOf_Departure);
	}

	public I_MM_Waybill getMM_Waybill() throws RuntimeException
    {
		return (I_MM_Waybill)MTable.get(getCtx(), I_MM_Waybill.Table_Name)
			.getPO(getMM_Waybill_ID(), get_TrxName());	}

	/** Set Waybill ID.
		@param MM_Waybill_ID Waybill ID	  */
	public void setMM_Waybill_ID (int MM_Waybill_ID)
	{
		if (MM_Waybill_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_MM_Waybill_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_MM_Waybill_ID, Integer.valueOf(MM_Waybill_ID));
	}

	/** Get Waybill ID.
		@return Waybill ID	  */
	public int getMM_Waybill_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Waybill_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

    /** Get Record ID/ColumnName
        @return ID/ColumnName pair
      */
    public KeyNamePair getKeyNamePair() 
    {
        return new KeyNamePair(get_ID(), String.valueOf(getMM_Waybill_ID()));
    }

	/** Set Wabill Line ID.
		@param MM_WaybillLine_ID Wabill Line ID	  */
	public void setMM_WaybillLine_ID (int MM_WaybillLine_ID)
	{
		if (MM_WaybillLine_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_MM_WaybillLine_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_MM_WaybillLine_ID, Integer.valueOf(MM_WaybillLine_ID));
	}

	/** Get Wabill Line ID.
		@return Wabill Line ID	  */
	public int getMM_WaybillLine_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_WaybillLine_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}